package com.ningxun.rms.mapper;

import java.util.List;
import com.ningxun.rms.domain.busrequire.BusRequireApprove;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 岗位需求审核Mapper接口
 * 
 * @author rms
 * @date 2025-07-15
 */
@Mapper
public interface BusRequireApproveMapper 
{
    /**
     * 查询岗位需求审核
     * 
     * @param approveId 岗位需求审核主键
     * @return 岗位需求审核
     */
    public BusRequireApprove selectBusRequireApproveByApproveId(Long approveId);

    /**
     * 查询岗位需求审核列表
     * 
     * @param busRequireApprove 岗位需求审核
     * @return 岗位需求审核集合
     */
    public List<BusRequireApprove> selectBusRequireApproveList(BusRequireApprove busRequireApprove);

    /**
     * 新增岗位需求审核
     * 
     * @param busRequireApprove 岗位需求审核
     * @return 结果
     */
    public int insertBusRequireApprove(BusRequireApprove busRequireApprove);

    /**
     * 修改岗位需求审核
     * 
     * @param busRequireApprove 岗位需求审核
     * @return 结果
     */
    public int updateBusRequireApprove(BusRequireApprove busRequireApprove);

    /**
     * 删除岗位需求审核
     * 
     * @param approveId 岗位需求审核主键
     * @return 结果
     */
    public int deleteBusRequireApproveByApproveId(Long approveId);

    /**
     * 批量删除岗位需求审核
     * 
     * @param approveIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBusRequireApproveByApproveIds(Long[] approveIds);

    /**
     * 事务
     * 修改后将审核表的approveStatus同步为1：未审核
     * @param requireId
     * @param approveStatus
     * @return
     */
    int updateApproveStateByRequireId(@Param("requireId") Long requireId, @Param("approveStatus") Long approveStatus);

    void insertBusRequireApproveByRequireId(@Param("requireId") Long requireId, @Param("approveStatus") Long approveStatus);
}
